import React, { Component, Fragment } from "react";
import HomeHead from "./Homeheader"
import { connect } from "react-redux";
import actions from "../../store/actions/home";
import HomeSwiper from "./HomeSwiper";

class Home extends Component {
    componentDidMount(){
        this.props.getSliders();
    }
    render() {
        let { 
            categroy,
            changeCategroy,
            slider
        } = this.props;
        return (<Fragment>
            <HomeHead
                categroy={categroy}
                changeCategroy={changeCategroy}
            />
            <div className="home-swiper-war">
                <HomeSwiper
                 slider={slider}
                />
            </div>

        </Fragment>)
    }
}
export default connect(state => state.home, actions)(Home)
